home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / RESOURCES / CH6 / EMAGA6 / control / client / misc / screens.cs < prev    next >
Text File  |  2004-03-10  |  2KB  |  81 lines

  1. //============================================================================
  2. // control/client/misc/screens.cs
  3. //
  4. // Copyright (c) 2003 Kenneth C. Finney
  5. //============================================================================
  6.  
  7. //-----------------------------------------------------------------------------
  8. // PlayerInterface is the main TSControl through which the game is viewed.
  9. // The PlayerInterface also contains the hud controls.
  10. //-----------------------------------------------------------------------------
  11.  
  12.  
  13.  
  14. function PlayerInterface::onWake(%this)
  15. {
  16.    $enableDirectInput = "1";
  17.    activateDirectInput();
  18.  
  19.    // just update the action map here
  20.    playerKeymap.push();
  21.  
  22.    // hack city - these controls are floating around and need to be clamped
  23.    schedule(0, 0, "refreshCenterTextCtrl");
  24.    schedule(0, 0, "refreshBottomTextCtrl");
  25. }
  26.  
  27. function PlayerInterface::onSleep(%this)
  28. {
  29.    // pop the keymaps
  30.    playerKeymap.pop();
  31. }
  32.  
  33.  
  34. //-----------------------------------------------------------------------------
  35.  
  36. function refreshBottomTextCtrl()
  37. {
  38.  //  BottomPrintText.position = "0 0";
  39. }
  40.  
  41. function refreshCenterTextCtrl()
  42. {
  43. //   CenterPrintText.position = "0 0";
  44. }
  45.  
  46.  
  47.  
  48.  
  49.  
  50. //------------------------------------------------------------------------------
  51. function LoadScreen::onAdd(%this)
  52. {
  53.    %this.qLineCount = 0;
  54. }
  55.  
  56. //------------------------------------------------------------------------------
  57. function LoadScreen::onWake(%this)
  58. {
  59.    // Play sound...
  60.    CloseMessagePopup();
  61. }
  62.  
  63. //------------------------------------------------------------------------------
  64. function LoadScreen::onSleep(%this)
  65. {
  66.    // Clear the load info:
  67.    if ( %this.qLineCount !$= "" )
  68.    {
  69.       for ( %line = 0; %line < %this.qLineCount; %line++ )
  70.          %this.qLine[%line] = "";
  71.    }
  72.    %this.qLineCount = 0;
  73.  
  74.    LOAD_MapName.setText( "" );
  75.    LOAD_MapDescription.setText( "" );
  76.    LoadingProgress.setValue( 0 );
  77.    LoadingProgressTxt.setValue( "WAITING FOR SERVER" );
  78.  
  79.    // Stop sound...
  80. }
  81.